Component({
  mixins: [],
  data: {
    statusConfig: {
      常规: {
        themeColor: '#4080ff',
      },
      紧急: {
        themeColor: '#ff7d00',
      },
      特急: {
        themeColor: '#ff4d4f',
      }
    },
  },
  props: {
    item: [],
    onViewDetail: function () {},
    isShowRemainingtimes: false
  },
  didMount() {},
  didUpdate() {},
  didUnmount() {},
  methods: {
    viewDetail() {
      this.props.onViewDetail(this.props.item.id);
    },
    openMapLink() {
      const {
        latitude,
        longitude,
        faultLocation
      } = this.props.item
      console.log(faultLocation, latitude, longitude)
      const options = {
        name: faultLocation,
        latitude,
        longitude
      };
      if (latitude && longitude) {
        my.openLocation({
          longitude,
          latitude,
          title: faultLocation,
          address: faultLocation
        })
      } else {
        my.showToast({
          content: '点位信息不存在',
          type: 'fail'
        })
      }
    },
  },
});